<?php

namespace app\admin\model;
use app\base\model\Base;
use think\Cache;
use think\Request;
class UsersInvest extends Base
{
    //

    //自然人信息

    public function getYidongdianhuaAttr($value){
        $sid = w_g("sid");
        $row =  Cache::get($sid);
        if(!$row['is_m_show']){
            $value = substr_replace($value, '****', 5, 4);
        }
        return $value;
    }
    public function getHtimageAttr($value){
        $ip = Request::instance()->domain();
        if(!empty($value)){
            $value = $ip."/".$value;
        }
        return $value;
    }

    public function getImageAttr($value){
        $ip = Request::instance()->domain();
        if(!empty($value)){
            $value = $ip."/".$value;
        }
        return $value;
    }

    public function UsersInvest_page($where=[]){
        $files = "*";
        $result = $this->alias("a")
            ->field($files)
            ->where($where)
            ->order("a.created_at")
            //   ->select(false);
            ->paginate(700);


return     $this->trs_pages_join($result);
}

}
